/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ems.entity;

import java.util.List;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 部门Entity
 * @author zad
 * @version 2018-01-25
 */
public class EmsDept extends DataEntity<EmsDept> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 部门名称
	private String logo;        // 缩略图
	private EmsArea area;		// 所属地区
	private String status;		// 是否启用
	
	// 用于前台分类展示
	private List<EmsMajor> majorList;  // 部门下专业列表
	
	public EmsDept() {
		super();
		this.status = Global.YES;
	}

	public EmsDept(String id){
		super(id);
	}

	@Length(min=1, max=64, message="部门名称长度必须介于 1 和 64 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotNull(message="所属地区不能为空")
	public EmsArea getArea() {
		return area;
	}

	public void setArea(EmsArea area) {
		this.area = area;
	}
	
	@Length(min=0, max=2, message="是否启用长度必须介于 0 和 2 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public List<EmsMajor> getMajorList() {
		return majorList;
	}

	public void setMajorList(List<EmsMajor> majorList) {
		this.majorList = majorList;
	}
	
}